package top.aiprogram.user.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import top.aiprogram.user.dao.TeacherMapper;
import top.aiprogram.user.entity.Teacher;


@Service("teacherServiceImpl")
public class TeacherServiceImpl implements TeacherService{
    @Autowired
    private TeacherMapper teacherMapper;
    @Override
    @Transactional//(RollbackFor = Exception.class)
    public int createTeacher(Teacher teacher) {
        teacherMapper.insertSelective(teacher);
        return 0;
    }
}
